package GJ;

import java.util.Calendar;

public class Time {

    public static int year;
    public static int month;
    public static int day;
    public static int hh;
    public static int minute;
    public static int second;

    public String toString(){
        Calendar calendar = Calendar.getInstance();
        year = calendar.get(Calendar.YEAR);
        month = calendar.get(Calendar.MONTH);
        day = calendar.get(Calendar.DAY_OF_MONTH);
        hh = calendar.get(Calendar.HOUR);
        minute = calendar.get(Calendar.MINUTE);
        second = calendar.get(Calendar.SECOND);
        return year+";"+month+";"+day+";"+hh+";"+minute+";"+second;
    }
    public int returnSecond(){
        return Time.second;
    }
    public int returnMinute(){
        return Time.minute;
    }
    public int returnMonth(){
        return Time.month;
    }
    public int returnDay(){
        return Time.day;
    }
    public int returnHh(){
        return Time.hh;
    }
    public int returnYear(){
        return Time.year;
    }
}
